"""
文件: ipc.py
功能: 进程间 IPC 通信
"""

from multiprocessing import Process, Queue


def worker(q):
    q.put("hello i am sub process")


if __name__ == "__main__":
    q = Queue()
    p = Process(target=worker, args=(q,))
    p.start()
    print("recv message", q.get())
    p.join()
